﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace docNET.Common
{
	/// <summary>
	/// Represents a project.
	/// </summary>
	public class Project
	{
		/// <summary>
		/// Initializes a new instance of the Project class.
		/// </summary>
		private Project()
		{
		}

		/// <summary>
		/// Initializes a new instance of the Project class.
		/// </summary>
		/// <param name="projectFile">Full path to the project file.</param>
		public Project(string projectFile)
		{
			Name = Path.GetFileNameWithoutExtension(projectFile);
			ProjectFile = projectFile;
			ProjectFilesFolder = string.Format("{0}\\{1}", Path.GetDirectoryName(projectFile), Name);
			ProjectFiles = new List<string>();
		}

		#region Properties
		/// <summary>
		/// Name of the project.
		/// </summary>
		public string Name { get; set; }

		/// <summary>
		/// Full path to the project file.
		/// </summary>
		public string ProjectFile { get; set; }
		
		/// <summary>
		/// Full path to the project files folder.
		/// </summary>
		public string ProjectFilesFolder { get; set; }

		/// <summary>
		/// When the project was last saved to file.
		/// </summary>
		public DateTime LastSaved { get; set; }

		/// <summary>
		/// Files contained in the project.
		/// </summary>
		public List<string> ProjectFiles { get; set; }
		#endregion
	}
}
